<div class="tab_item" style="display: block">
    <#--<div class="toolbar clearfix">-->
        <#--<h3>账户余额详情</h3>-->
    <#--</div>-->
    <div class="toolbar clearfix">
        <h6></h6>
    </div>
        <div class="panel search">
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td align="right" width="60">总收入：</td>
                    <td><input type="text" class="text easyui-validatebox" maxlength="15"
                               value="<#if entity.balance??&&entity.balance!=0>${entity.balance/100}<#else>0.00</#if>元" /></td>

                    <td align="right" width="110">按次换电总收入：</td>
                    <td><input type="text" class="text easyui-validatebox" maxlength="15" value="${sumAgencyMoney1/100}元"/></td>

                    <td align="right" width="110">套餐换电总收入：</td>
                    <td><input type="text" class="text easyui-validatebox" maxlength="15" value="${sumAgencyMoney2/100}元"/></td>
                </tr>
            </table>
        </div>
    <div class="toolbar clearfix">
        <h6></h6>
    </div>
    <div class="grid" style="height:400px;">
        <table id="page_table_box_${pid}"></table>
    </div>
</div>

<div class="popup_btn">
    <button class="btn btn_border close">关闭</button>
</div>

<script>
    $(function () {
        $('#page_table_box_${pid}').datagrid({
            fit: true,
            width: '100%',
            height: '100%',
            striped: true,
            pagination: true,  <#--true：允许分页-->
            url: "${contextPath}/security/hdw/agency_in_out_money/pageMoney.htm",
            fitColumns: true,
            pageSize: 10,
            pageList: [10, 50, 100],
            idField: 'id',
            singleSelect: true,
            selectOnCheck: false,
            checkOnSelect: false,
            autoRowHeight: false,
            rowStyler: gridRowStyler,
            columns: [
                [
                    {
                        title: '订单号',
                        align: 'center',
                        field: 'sourceId',
                        width: 50
                    },
                    // {
                    //     title: '营业额（元）',
                    //     align: 'center',
                    //     field: 'amount',
                    //     width: 40
                    // },
                    // {
                    //     title: '总部/运营商/代理商分成比例（%）',
                    //     align: 'center',
                    //     field: 'orgTypeName',
                    //     width: 80
                    // },
                    {
                        title: '实际收入(元)',
                        align: 'center',
                        field: 'money',
                        width: 50,
                        formatter: function (val, row) {
                            return (val / 100).toFixed(2);
                        }
                    }
                ]
            ],
            onLoadSuccess: function () {
                $('#page_table_box_${pid}').datagrid('clearChecked');
                $('#page_table_box_${pid}').datagrid('clearSelections');
            }
        });
    });
    <#--刷新页面-->
    function reload() {
        var datagrid = $('#page_table_box_${pid}');
        datagrid.datagrid('reload');
    }
    <#--关闭-->
    (function() {
        var pid = '${pid}',
                win = $('#' + pid),
                form = win.find('form');
        win.find('button.close').click(function() {
            win.window('close');
        });

    })();
</script>
